package com.obas.model.type;

import com.ease.common.enums.EnumUtil;
import com.ease.common.enums.TextualEnum;

/**
 *
 * @author nathanleewei
 *
 */
public enum DimensionAttributeType implements TextualEnum, AttributeColumnType {

//	DURATION("时长", "duration", "DURATION", "VARCHAR2", 255, 20), //
	LOCATION_ID("地域", "locationId", "LOCATION_ID",  "NUMBER", 0, 30), //
	BANDWIDTHTYPE_ID("速率", "bandwidthTypeId", "BANDWIDTHTYPE_ID",  "NUMBER", 0, 30), //
//	LOCATIONCODE("地域", "areaCode", "AREACODE", "VARCHAR2", 255, 30), //
//	PROTOCAL("协议", "protocal", "PROTOCAL", "VARCHAR2", 255, 40), //	
	CUSTOMER_ID("用户名", "customerId", "CUSTOMER_ID",  "NUMBER", 0, 60), //
//	USERNAME("用户名", "username", "USERNAME", "VARCHAR2", 255, 60), //
//	USERMACADDRESS("用户MAC", "userMacAddress", "USERMACADDRESS", "VARCHAR2", 255, 70), //
//	BANDTYPE("绑定类型", "bandType", "BANDTYPE", "VARCHAR2", 255, 80), //
//	BANDATTR("绑定属性", "bandAttr", "BANDATTR", "VARCHAR2", 255, 90), //
	DEVICE_ID("设备ID", "deviceId", "DEVICE_ID", "NUMBER", 0, 100), //
	ROUTE_ID("路由ID", "routeId", "ROUTE_ID", "NUMBER", 0, 100), //
//	DEVICETYPE("设备类型", "deviceType", "DEVICETYPE", "VARCHAR2", 255, 100), //
//	DEVICECODE("设备编码", "deviceCode", "DEVICECODE", "VARCHAR2", 255, 110), //
//	DEVIECNAME("设备名称", "deviecName", "DEVIECNAME", "VARCHAR2", 255, 120), //
//	DEVICEIPADDRESS("设备IP", "deviceIpAddress", "DEVICEIPADDRESS", "VARCHAR2", 255, 130), //
	IPSOURCE("IP源", "ipSource", "IPSOURCE", "VARCHAR2", 255, 140), //
	PORTSOURCE("P源", "portSource", "PORTSOURCE", "VARCHAR2", 255, 150), //
	IPDESTINATION("IP目标", "ipDestination", "IPDESTINATION", "VARCHAR2", 255, 160), //
	PORTDESTINATION("P目标", "portDestination", "PORTDESTINATION", "VARCHAR2", 255, 170), //
	SVCIDENTITY("业务名称", "svcIdentity", "SVCIDENTITY", "NUMBER", 0, 180), //BUSINESSSERVING_IDENTITY
	APPIDENTITY("应用名称", "appIdentity", "APPIDENTITY", "NUMBER", 0, 190), //BUSINESSAPPLICATION_IDENTITY
	PORT_ID("PORT", "portId", "PORT_ID", "NUMBER", 0, 220), //
//	PORTCODE("PORT", "portCode", "PORTCODE", "VARCHAR2", 255, 220), //
	SVLAN_ID("SVLAN", "svlanId", "SVLAN_ID", "NUMBER", 0, 210), //
//	SVLAN("SVLAN", "svlan", "SVLAN", "VARCHAR2", 255, 210), //
	CVLAN("CVLAN", "cvlan", "CVLAN", "VARCHAR2", 255, 220); //

	private String text;

	private String code;

	private String columnName;

	private String dataType;

	private int length;

	private int ordinal;

	private DimensionAttributeType(String text, String code, String columnName, String dataType, int length, int ordinal) {
		this.text = text;
		this.code = code;
		this.columnName = columnName;
		this.dataType = dataType;
		this.length = length;
		this.ordinal = ordinal;
	}

	public static DimensionAttributeType get(String name) {
		return EnumUtil.get(DimensionAttributeType.class, name);
	}

	public String getText() {
		return text;
	}

	public String getName() {
		return name();
	}

	/**
	 * @return the code
	 */
	public String getCode() {
		return code;
	}

	/**
	 * @return the columnName
	 */
	public String getColumnName() {
		return columnName;
	}

	/**
	 * @return the dataType
	 */
	public String getDataType() {
		return dataType;
	}

	/**
	 * @return the length
	 */
	public int getLength() {
		return length;
	}

	/**
	 * @return the ordinal
	 */
	public int getOrdinal() {
		return ordinal;
	}

}
